class Room:
    def __init__(self,roomNumber,roomType,price,isBooked=False):
        self.__roomNumber=roomNumber
        self.__roomType=roomType
        self.__price=price
        self.__isBooked=isBooked
    def bookRoom(self):
        self.__isBooked=True
    def cancelBooking(self):
        self.__isBooked=False
    def getRoomInfo(self):
        return {
            "roomNumber":self.__roomNumber,
            "roomType":self.__roomType,
            "price":self.__price,
            "isBooked":self.__isBooked
        }
class Hotel:
    rooms=[]

    @classmethod
    def addRoom(cls, room):
        cls.rooms.append(room)
    @classmethod
    def getAvailableRooms(cls):
        cnt=0
        for room in cls.rooms:
            if not room.getRoomInfo()["isBooked"]:
                cnt+=1
        return cnt

Hotel.addRoom(Room(1,"普通",100))
Hotel.addRoom(Room(2,"双人间",200))
Hotel.addRoom(Room(3,"总统套房",2000,True))

print(f"可预订的房间数为：{Hotel.getAvailableRooms()}")
